package com.vanke.kotlin.domain

/**
 * @name Kotlin
 * @package name：com.vanke.kotlin.domain
 * @class describe
 * @anthor shiyuchuan
 * @time 2017/7/21 10:00
 */
data class ForecastList(val id: Long,val city: String,
                        val country: String, val dailyForecast: List<Forecast>) {

//    operator fun get(position: Int): Forecast =
//                        dailyForecast[position]
//
//    fun size(): Int = dailyForecast.size
    operator fun get(position: Int) = dailyForecast[position]

    fun size() = dailyForecast.size
}

data class Forecast(val id: Long,val date: Long, val description: String, val high: Int,
                    val low: Int, val iconUrl: String)